<html>
<body>
<h2 id="test">Hello World!</h2>
<button type="button" onclick="selectUser()">onclick test</button>
</body>
<script>
    function selectUser() {
        let xmlHttp = new XMLHttpRequest()
        xmlHttp.onreadystatechange = function () {
            if (xmlHttp.readyState == 4 && xmlHttp.status == 200) {
                document.getElementById("test").innerHTML = xmlHttp.responseText
            }
        }
        xmlHttp.open("POST", "user/showUser", true)
        xmlHttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded")
        xmlHttp.send("userID=1")
    }
</script>
</html>
